1. Field of the Invention
The present invention generally relates to a battery monitor, and in particular to a battery monitoring method and system for use in battery-powered electronic equipment such as a palmtop personal computer using a pen as an input device and a hand-held personal computer.
2. Description of the Related Art
For battery-powered portable electronic apparatuses, it is very important to monitor the remaining quantity of battery power. In the case where a coke-base lithium ion cell is used as a power supply battery, the remaining quantity of the cell can be monitored by measuring the output voltage of the cell under a constant load condition, that is, a constant power consumption condition. In Japanese Utility-Model Unexamined publication No. 5-47871, for example, a battery voltage detector has been disclosed which uses an analog-to-digital converter (ADC) and a central processing unit (CPU) to measure the output voltage of a lithium cell.
However, in multitasking environment where the CPU works on more than one task at a time, the CPU varies in power consumption depending on the number of working tasks. Since the output voltage of the cell should be measured under a constant load condition, the CPU may run only a battery monitoring task to keep the power consumption thereof constant. In other words, a multitasking operating system (OS) should provides a special mode of operation which the battery monitoring task runs only.